<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
     <li>全部有效的订单列表</li>
  </ol>
  <form class="form-inline search-box" role="form" ng-submit="search()" novalidate>
     <div class="form-group" style="display:table" >
      <label style="float:left;width:50px;">
        <input type="checkbox" name="ptype" value="02" ng-click="changeProductType();">信托
      </label>
      <label style="float:left;width:50px;">
        <input type="checkbox" name="ptype" value="03" ng-click="changeProductType();">资管
      </label>
      <label style="float:left;width:100px;">
        <input type="checkbox" name="ptype" value="07" ng-click="changeProductType();">债权基金
      </label>
      <label style="float:left;width:100px;">
        <input type="checkbox" name="ptype" value="06" ng-click="changeProductType();">股权基金
      </label>
     
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="订单ID" name="id" ng-model="searchMap.id" style="width:100px;"></input> 
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="订单编号" name="oCode" ng-model="searchMap.oCode" ></input> 
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="理财师手机号码" name="oULoginName" ng-model="searchMap.oULoginName" ></input> 
    </div>
    <div class="form-group">
      <input class="form-control" placeholder="产品名称" name="oPName" ng-model="searchMap.oPName" ></input> 
    </div>

    <div class="form-group">
      <select  class="form-control" placeholder="产品负责人" ng-model="searchMap.oManagerName" ng-options="m.userNickname as m.userNickname for m in productCreatByList" >
        <option value="">--产品负责人--</option>
      </select>     
    </div>
    <div class="form-group">
      <select  class="form-control" placeholder="订单跟进人" ng-model="searchMap.oFlowerName" ng-options="u.username as u.username for u in orderManagerUserList" >
        <option value="">--订单跟进人--</option>
      </select> 
    </div>
        <div class="form-group">
      <select class="form-control" placeholder="订单状态" ng-model="searchMap.oStatus" ng-options="m.value as m.text for m in dictMap.effectiveOrderStatusModel" ><option value="">--选择订单状态--</option></select> 
    </div>
    
    <div class="form-group">
      <label>预约日期</label>
      <input type="date" class="form-control" placeholder="开始日期,如2015-01-01" ng-model="searchMap.createDateStart" maxlength="10" title="预约开始日期">
    </div>至 
    <div class="form-group">
      <input type="date" class="form-control" placeholder="结束日期,如2015-01-01" ng-model="searchMap.createDateEnd" maxlength="10" title="预约结束日期">
    </div>
    
       <div class="form-group">
      <label>财务打款日期</label>
      <input type="date" class="form-control" placeholder="开始日期,如2015-01-01" ng-model="searchMap.flowCreateDateStart" maxlength="10" title="财务打款开始日期">
    </div>至 
    <div class="form-group">
      <input type="date" class="form-control" placeholder="结束日期,如2015-01-01" ng-model="searchMap.flowCreateDateEnd" maxlength="10" title="财务打款结束日期">
    </div>
    
  <div class="form-group">
    <select class="form-control" placeholder="订单来源媒体" ng-model="searchMap.oMediaSource" ng-options="m.value as m.text for m in dictMap.mediaSourceModel" >
      <option value="">--选择订单来源媒体--</option>
    </select>
    </div> 

    <button type="submit" class="btn btn-default">查询</button> 
  </form>
  <table class="table table-striped table-hover">
    <thead>
      <tr>
        <th width="30"><input type="checkbox" id="chkAllOrderList" ng-click="chkAllOrderList();" /></th>
        <th width="40">订单ID</th>
        <th width="40">订单号</th>
        <th width="60">产品简称</th>
        <th width="80">订单金额</th>
        <th width="60">客户姓名</th>
        <th width="50">FAID</th>
        <th width="80">订单跟进人</th>
        <th width="80">产品负责人</th>
        <th width="40">状态</th>
        <th width="60">预约时间</th>
        <th width="60">处理时间</th>
        <th width="40">來源</th>
        <th width="50">承销人</th>
        <th width="40">佣金</th>
        <th width="60">支付状态</th>
        <th width="110">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr ng-repeat="item in list">
        <td>
          <input type="checkbox" name="chkOrderList" value="{{item.id}}" faid="{{item.oFAId}}" omu="{{item.orderManagerUser}}" />
        </td>
        <td><a ng-click="toViewPage(item.id,item.oPType,'neworder/caiwu/ordermanager/effective/view?')" href="javascript:">{{item.id}}</a></td>
        <td><a ng-click="toViewPage(item.id,item.oPType,'neworder/caiwu/ordermanager/effective/view?')" href="javascript:">{{item.oCode}}</a></td>
        <td  ng-if="item.oPType == '06'">
          <a href="https://www.superfa.cn/product/pevc/view/{{item.oProjectCode}}" target="_blank">{{item.oPName}}</a>
        </td>
        <td ng-if="item.oPType != '06'">
          <a href="http://www.superfa.cn/product/{{item.oProjectCode}}" target="_blank">{{item.oPName}}</a>
        </td>
        <td>{{item.oAmount | moneyRender2}}</td>
        <td>{{item.oCName}}</td>
        <td>{{item.oFAId}}</td>
        <td>{{item.oFlowerName}}</td>
        <td>{{item.oManagerName}}</td>
        <td class="order-status-{{item.oStatus}}">{{item.oStatus | orderStatusRender}}</td>
        <td>{{item.createDate | date:'yyyy-MM-dd HH:mm'}}</td>
        <td>{{item.updateDate | date:'yyyy-MM-dd HH:mm'}}</td>
         <td>{{item.oMediaSource|mediaSourceRender}}</td>
         <td>{{item.oOwnerId}}</td>
         <td>{{item.oYouDanRebate | moneyRender2}}</td>
         <td>{{item.oYouDanReceiverRebate | oYouDanReceiverRenter}}</td>
        <td class="optd">
          <!--<a href="#/neworder/caiwu/ordermanager/effective/view?id={{item.id}}&pType={{item.oPType}}" has-auth where="btn" who="PEVC_ORDER_EDIT">编辑</a>-->
          <a ng-click="toViewPage(item.id,item.oPType,'neworder/caiwu/ordermanager/effective/view?')" href="javascript:">编辑</a>
        </td>
      </tr>
    <tbody>
  </table>

	<div class="pager-box" ng-include src="'tpl/public/pager.html'" ng-show="list.length > 0"></div>
</div>


<div class="layer-box" ng-show="isShowOrder"  >
  <div class="layer-bg"></div>

  <div class="layer-con " style="padding:10px 20px; width:440px;height:335px;">
    <span class="icons-close" title="关闭" ng-click="isShowOrder = false;">X</span>
    <div class="layer-title">
      <label >订单情况</label>
    </div>
    <div style="padding:10px 20px; width:400px;height:300px;overflow: scroll">
    
    <div class="con-wrap">
      <div class="form-group" >

<div ng-if="orderList==''">
<table class="order-f-h ziliaoshangchuan" style="width:100%">
          <tr >
            <td >
              序号
            </td>
            <td >
              订单号
            </td>
            <td >
              当前状态
            </td>
            <td >
              停留天数
            </td>
          </tr>

          
        </table>


  无订单记录
</div>
<div ng-if="orderList.length>0">
        <table class="order-f-h ziliaoshangchuan" style="width:100%">
          <tr >
            <td >
              序号
            </td>
            <td >
              订单号
            </td>
            <td >
              当前状态
            </td>
            <td >
              停留天数
            </td>
          </tr>
          <tr ng-repeat="order in orderList">
            <td >
            {{$index+1}}
            </td>
            <td >
              {{order.o_code}}
            </td>
            <td >
              {{order.o_status}}
            </td>
            <td >
              {{order.dateDiffnow}}
            </td>
            
          </tr>
          
        </table>
        <div >
      </div>
    </div>
    </div>
  </div>
</div> 
